//
//  MyResumeManageCell.m
//  CYWFrame
//
//  Created by 于顺燊 on 2018/9/8.
//  Copyright © 2018年 Macx. All rights reserved.
//

#import "MyResumeManageCell.h"
#import "UIButton+zt_adjustImageAndTitle.h"
#import "EditResumeAllViewController.h"

@implementation MyResumeManageCell

- (void)awakeFromNib {
    [super awakeFromNib];
	
    // Initialization code
	[self.defaultBtn setImage:IMAGE(@"job_icon_default_grey") forState:UIControlStateNormal];
	[self.defaultBtn setImage:IMAGE(@"job_icon_default_color") forState:UIControlStateSelected];
	[self.defaultBtn setTitleColor:UIMainColorRGB forState:UIControlStateSelected];
	self.defaultBtn.zt_contentAdjustType = ZTContentAdjustImageUpTitleDown;
	[self.defaultBtn zt_beginAdjustContent];
	
	[self.previewBtn setImage:IMAGE(@"job_icon_preview") forState:UIControlStateNormal];
	self.previewBtn.zt_contentAdjustType = ZTContentAdjustImageUpTitleDown;
	[self.previewBtn zt_beginAdjustContent];
	
	[self.editBtn setImage:IMAGE(@"job_icon_edit") forState:UIControlStateNormal];
	self.editBtn.zt_contentAdjustType = ZTContentAdjustImageUpTitleDown;
	[self.editBtn zt_beginAdjustContent];
	
	[self.deleteBtn setImage:IMAGE(@"job_icon_delete") forState:UIControlStateNormal];
	self.deleteBtn.zt_contentAdjustType = ZTContentAdjustImageUpTitleDown;
	[self.deleteBtn zt_beginAdjustContent];
	
	self.layer.cornerRadius = 10;
}

- (void)setFrame:(CGRect)frame
{
	frame.origin.x += 10;
	frame.origin.y += 10;
	
	frame.size.width -= 20;
	frame.size.height -= 10;
	
	[super setFrame:frame];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (IBAction)setDefault:(id)sender {
	[self.delegate setDefaultResume:sender :self.resumeId];
}

- (IBAction)preview:(id)sender {
	[self.delegate previewResume:sender :self.resumeId];
}

- (IBAction)edit:(id)sender {
	[self.delegate editResume:sender :self.resumeId];
}

- (IBAction)delete:(id)sender {
	[self.delegate deleteResume:sender :self.resumeId];
}

@end
